// COOKIE
export const STORAGE_AUTH = 'vimiauth'
// export const STORAGE_TOKEN = 'token'
export const STORAGE_SIDEBAR_OPEN = 'storage_sidebar_open'
export const STORAGE_THEME = 'platform-theme'

// Pattern
export const PATTERN_PHONE = '(^1[3456789][0-9]{9}$)|(^0[0-9]{2,3}-?[0-9]{7,8})' // 手机号座机
export const PATTERN_ID_CARD = '(^[0-9]{15}$)|(^[0-9]{18}$)|(^[0-9]{17}([0-9]|X|x)$)' // 身份证号
export const PATTERN_REGISTER_NO = '(^[0-9a-zA-Z]{15,18}$)'
export const PATTERN_CREDIT_CARD = '[0-9]{13,16}' // 信用卡
export const PATTERN_UNIONPAY_CARD = '^62[0-5][0-9]{13,16}$' // 银联卡
export const PATTERN_USERNAME = '^[a-zA-Z]\\w{5,17}$' // 用户名：字母开头，长度在6~18之间，只能包含字母、数字和下划线
export const PATTERN_PASSWORD_STRONG = '^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{8,10}$' // 强密码：包含大小写字母和数字的组合，不能使用特殊字符，长度在8-10之间
// export const PATTERN_CHAR_LENGTH = '^[\u4e00-\u9fa5]{1,7}$|^[\dA-Za-z_]{1,14}$' // 7个汉字或14个字符

// path
const { protocol, origin } = window.location
export const domainUrl = 'vimihome.com:8088'

export const BASE_URL = /localhost/.test(origin) ? `${protocol}//bigdata.${domainUrl}` : origin
export const BASE_URL_H5 = `${BASE_URL}/androidh5` // 分享
export const BASE_URL_LIBS = `${BASE_URL}/libs` // cdn
export const BASE_URL_STATIC = `${BASE_URL}/static` // 静态资源

export const STORAGE_TOKEN_REFRESH = 'refresh_token'

export const BASE_URL_CHICK = `${protocol}//chick.${domainUrl}`
export const BASE_URL_GXS = `${protocol}//gxs.${domainUrl}`

export const IMG_DEFAULT = `http://vimi8.oss-cn-shenzhen.aliyuncs.com/credit/img_default.png`

export const TEXT_COPYRIGHT = `Copyright © 2015-2025 贵州为米科技有限公司 vimi8.com All Rights Reserved. 备案号：<a href="//beian.miit.gov.cn" target="_blank">黔ICP备13002402号-1</a>`

export const PASSWORD_MD5 = '10449f26c1c03bd858fa12cacde9278a'
